<script setup lang="ts">
import dayjs from 'dayjs'
const props = defineProps<{ user: UserModel; commontCreateDate: number }>()
</script>

<template>
   <div class="user px-5 pt-4 flex items-center">
      <img class="w-10 h-10 rounded-full object-cover" :src="user!.avatar" alt="" />
      <div class="flex justify-between items-center flex-col p-2">
         <div class="username text-sm">{{ user?.nickname || user?.username }}</div>
         <div class="date text-[10px] text-slate-500">{{ dayjs(commontCreateDate).fromNow() }}</div>
      </div>
   </div>
</template>
